<?php
declare(strict_types=1);

namespace LowCode\Traits;

trait HasInstance
{
    /**
     * @param string $name
     * @return static
     */
    public static function getInstance(string $name): static
    {
        if (!isset(self::$instance)) {
            self::$instance = new self($name);
        }
        return self::$instance;
    }
}
